| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | 'use strict' |
||
| 5 | module.exports = (baseFileDir, value) => { |
||
| 6 | if ( typeof(value |
||
| 7 | ) != 'object' ) { |
||
| 8 | return value |
||
| 9 | } |
||
| 10 | |||
| 11 | let filePath = baseFileDir + '/' + value.file |
||
| 12 | let fileContent |
||
| 13 | |||
| 14 | //try { |
||
| 15 | fileContent = fs.readFileSync(filePath, 'utf-8') |
||
| 16 | //} catch(error) { |
||
| 17 | // fileContent = '--Error loading file--'; |
||
| 18 | //} |
||
| 19 | |||
| 20 | return value.text |
||
| 21 | ? value.text.replace('$FILE', fileContent) |
||
| 22 | : fileContent |
||
| 23 | } |
||
| 24 |